<template>
  信息列表
  <el-table :data="tableData" border style="width: 100%">
    <el-table-column prop="userName" label="用户昵称" align="center" />
    <el-table-column prop="userNick" label="用户名称" align="center" />
    <!-- <el-table-column prop="roleName" label="用户角色" align="center" />
    <el-table-column prop="description" label="用户权限" align="center" /> -->
    <el-table-column prop="password" label="用户密码" align="center">
      <template v-slot="scope">
        *****
      </template>
    </el-table-column>
    <el-table-column prop="address" label="操作">
      <template v-slot="scope">
        <el-button type="text">编辑</el-button>
        <el-button type="text">删除</el-button>
      </template>
    </el-table-column>
  </el-table>
</template>

<script setup lang='ts'>
//引入组件
import axios from 'axios';
import { ElMessage } from 'element-plus';
import { ref, reactive, onMounted } from 'vue'
import { apiInstance1 } from '@/services/api'
import { useRouter } from 'vue-router';


const getTableData = () => {
  apiInstance1.get('http://localhost:20761/api/UserInfo/GetListUserInfo').then(res => {
    tableData.value = res.data
  }).catch(err => {
    ElMessage.error(err.message)
  })
}

onMounted(() => {
  getTableData()
})

//定义变量
const tableData = ref([])

//定义接口



</script>

<style></style>
